var option = {
    color: ['#80FFA5', '#00DDFF', '#37A2FF', '#FF0087', '#FFBF00'],
    tooltip: {
      trigger: 'axis',
      axisPointer: {
        type: 'cross',
        label: {
          backgroundColor: '#6a7985',
          color: '#ffffff' // 提示框指示器的字体颜色
        }
      }
    },
    legend: {
      textStyle: {
        color: '#ffffff' // 图例字体颜色
      }
    },
    toolbox: {
      feature: {
        saveAsImage: {}
      }
    },
    grid: {
      left: '3%',
      right: '4%',
      bottom: '3%',
      containLabel: true
    },
    xAxis: [
      {
        type: 'category',
        name: '年份',
        boundaryGap: false,
        data: ['2016', '2018', '2020', '2021', '2022', '2023', '2024'],
        axisLabel: {
          color: '#ffffff' // X 轴字体颜色
        },
        axisLine: {
          lineStyle: {
            color: '#ffffff' // X 轴线颜色
          }
        }
      }
    ],
    yAxis: [
      {
        type: 'value',
        name: '万元',
        axisLabel: {
          color: '#ffffff' // Y 轴字体颜色
        },
        axisLine: {
          lineStyle: {
            color: '#ffffff' // Y 轴线颜色
          }
        },
        splitLine: {
          lineStyle: {
            color: '#666666' // Y 轴网格线颜色，适当调整对比度
          }
        }
      }
    ],
    series: [
      {
        name: '二手汽车',
        type: 'line',
        stack: 'Total',
        smooth: true,
        lineStyle: {
          width: 0
        },
        showSymbol: false,
        areaStyle: {
          opacity: 0.8,
          color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
            { offset: 0, color: 'rgb(128, 255, 165)' },
            { offset: 1, color: 'rgb(1, 191, 236)' }
          ])
        },
        emphasis: {
          focus: 'series'
        },
        data: [240,296,435,368,501,596,635]
      },
      {
        name: '科技产品',
        type: 'line',
        stack: 'Total',
        smooth: true,
        lineStyle: { width: 0 },
        showSymbol: false,
        areaStyle: {
          opacity: 0.8,
          color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
            { offset: 0, color: 'rgb(0, 221, 255)' },
            { offset: 1, color: 'rgb(77, 119, 255)' }
          ])
        },
        emphasis: {
          focus: 'series'
        },
        data: [120,165,216,285,331,391,425]
      },
      {
        name: '珠宝文玩',
        type: 'line',
        stack: 'Total',
        smooth: true,
        lineStyle: { width: 0 },
        showSymbol: false,
        areaStyle: {
          opacity: 0.8,
          color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
            { offset: 0, color: 'rgb(55, 162, 255)' },
            { offset: 1, color: 'rgb(116, 21, 219)' }
          ])
        },
        emphasis: {
          focus: 'series'
        },
        data: [101,128,195,173,231,247,211]
      },
      {
        name: '二手高奢',
        type: 'line',
        stack: 'Total',
        smooth: true,
        lineStyle: { width: 0 },
        showSymbol: false,
        areaStyle: {
          opacity: 0.8,
          color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
            { offset: 0, color: 'rgb(255, 0, 135)' },
            { offset: 1, color: 'rgb(135, 0, 157)' }
          ])
        },
        emphasis: {
          focus: 'series'
        },
        data: [40,59,165,91,201,231,295]
      },
      {
        name: '生活用品',
        type: 'line',
        stack: 'Total',
        smooth: true,
        lineStyle: { width: 0 },
        showSymbol: false,
        label: {
          show: true,
          position: 'top',
          color: '#ffffff' // 线条上方的数值颜色
        },
        areaStyle: {
          opacity: 0.8,
          color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
            { offset: 0, color: 'rgb(255, 191, 0)' },
            { offset: 1, color: 'rgb(224, 62, 76)' }
          ])
        },
        emphasis: {
          focus: 'series'
        },
        data: [25,38,49,185,201,102,195]
      }
    ]
  };
  
  var chartDom = document.getElementById('chart-container');
  var myChart = echarts.init(chartDom);
  myChart.setOption(option);
